﻿using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using TeaLight.Core.DAL;
using TeaLight.DL.SQLite;

namespace TeaLight.Core.BL.Entities
{
    public partial class Session : BusinessEntityBase
    {
        #region Constructor

        public Session()
        {
        }

        #endregion

        #region Fields

        [XmlElement("t")]
        public string Title { get; set; }
        [XmlAttribute("s")]
        public DateTime StartTime { get; set; }
        [XmlAttribute("e")]
        public DateTime EndTime { get; set; }
        [XmlAttribute("r")]
        public string Room { get; set; }
        [XmlElement("o")]
        public string Overview { get; set; }

        #endregion

        #region Associations

        [XmlIgnore]
        [TeaLight.DL.SQLite.Ignore]
        public IEnumerable<SessionSpeaker> SessionSpeakers
        {
            get
            {
                return SessionRepository.GetSessionSpeakers(this);
            }
        }

        #endregion


    }

}
